<template>
  <div class="main">
  <div class="menu" >
    <div class="item" v-for="(item,index) in navData" :key="index">
      <router-link :to="item.path" >{{item.title}}</router-link>
    </div>

    <!-- <router-link to="/report" class="item">学生成绩单</router-link>
    <router-link to="/loading" class="item">加载</router-link>
    <router-link to="/HelloWorld" class="item">HelloWorld</router-link>
   <router-link to="/login" class="item">登录</router-link>
    <router-link to="/reserve" class="item">Hello Vue</router-link> -->
</div>
<div class="content">
<router-view class="view"></router-view>
</div>
</div>
</template>

<script>
import { navData } from "@/untils/nav";
import { onMounted } from "vue";
export default {
  name: 'App',
  components: {},
  setup(){
    onMounted(()=>{
      console.log(navData)
    })
    return{
      navData
    }
  }
}
</script>

<style scoped>
 #app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  /* margin-top: 60px; */
 }
.main{
  display: flex;
  flex-flow: row;
}
.menu{
  display: flex;
  flex-flow: column;
  background: #ccc;
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 200px;
}
.menu a{
  text-decoration: none;
  margin-top: 30px;
}
.item{
  padding: 10px;
}
</style>
